<?php
namespace app\tools\controller;
use app\tools\logic\ApiLogic;
use app\tools\logic\ChannelLogic;

class Channel extends Base{
	//获取列表
	function getList(){
		$data = ChannelLogic::getList();
		return ApiLogic::return(0,'',$data);
	}
	//获取详情
	function getInfo(){
		$info = ChannelLogic::getInfo();
		return ApiLogic::return(0,'',$info);
	}
	//保存
	function save(){
		$rs = ChannelLogic::save();
		if($rs){
			return ApiLogic::return($rs);
		}else{
			return ApiLogic::return(0);
		}
	}
	//新增
	function add(){
		$rs = ChannelLogic::add();
		if($rs){
			return ApiLogic::return($rs);
		}else{
			return ApiLogic::return(0);
		}
	}

	//删除
	function delete(){
		$rs = ChannelLogic::delete();
		if($rs){
			return ApiLogic::return($rs);
		}else{
			return ApiLogic::return(0);
		}
	}

}
